﻿using System;
using System.Data.Entity;
using System.Linq;
using Medora.DataContract;
using Medora.Model.Persons;

namespace Medora.Data
{
    public class VisitRepository : EFRepository<Visit>, IVisitRepository
    {
        public VisitRepository(DbContext dbContext) : base(dbContext)
        {
        }

        public virtual Visit GetById(Guid id)
        {
            var dbset = DbSet.Include(x => x.Person);
            return dbset.FirstOrDefault(o => o.Id == id);
        }

    }
}